
<html>
		<div id="center-column">
			<div class="top-bar">
			<a href="<?php echo  base_url();?>model/admin_add" class="button">新增</a>
				<h1>Contents</h1>
				<div class="breadcrumbs"><a href="#">用户管理</a></div>
			</div><br />
		  <div class="select-bar">
		    <label>
		    <input type="text" name="textfield" />
		    </label>
		    <label>
			<input type="submit" name="Submit" value="Search" />
			</label>
		  </div>
 <body>
			<div class="table">
				
				
				<table class="listing" cellpadding="0" cellspacing="0">
					<tr>
						<td>用户编号</td>
						<td>用户名</td>						
						<td>角色</td>
						<td>真实姓名</td>
						<td>部门</td>
						<td>职务</td>
						<td>职称</td>
						<td>备注</td>
						<td class="last">操作</td>
					</tr>
			    <?php foreach($admin as $k=>$val):?>		
					<tr>
                        <td><?php echo $start;?></td> 
						<td><?php echo $val->username;?></td> 
						<td><?php if ($val->role== 0 ){ echo "管理员";}else{ echo "用户";}?></td> 
						<td><?php echo $val->name;?></td>
						<td><?php echo $val->department;?></td> 
						<td><?php echo $val->post;?></td>
						<td><?php echo $val->title;?></td>
						<td><?php echo $val->remarks;?></td>
						<td><?php if($val->role==1){?><?php echo anchor('model/admin_reset/'.$val->admin_id,'重置密码',array('class'=>'admin_edit',"onclick"=>"return confirm('您确定要重置此人密码吗？')?true:false;"));?>&nbsp;&nbsp;|&nbsp;&nbsp; <?php }?><?php echo anchor('model/admin_detail/'.$val->admin_id,'查看',array('class'=>'admin_detail'));?>&nbsp;&nbsp;|&nbsp;&nbsp;<?php echo anchor('model/admin_edit/'.$val->admin_id,'编辑',array('class'=>'admin_edit'));if($user[0]->admin_id!=$val->admin_id){?>&nbsp;&nbsp;|&nbsp;&nbsp;<?php echo anchor('model/admin_del/'.$val->admin_id,'删除',array('class'=>'admin_edit',"onclick"=>"return confirm('您确定要删除吗？')?true:false;")); }?></td>
                    </tr>
				<?php $start++;endforeach;?>						
				</table>
				<?php echo $page;?>
			</div>
		</div>
	</div>
	<div id="footer"></div>
</div>

</body>
</html>
